package thread;


public class Test1 {
	
	public static void main(String[] args) {
		//得到当前主线程
		Thread t=Thread.currentThread();
		System.out.println(t);
		
		t.setName("TEMO");
		System.out.println(t);
		
		for (int i = 0; i < 5; i++) {
			System.out.println(i);
			try {
				Thread.sleep(1300); //休息一下
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
		
	}

}
